import kotlinx.serialization.Serializable

@Serializable
sealed class ClientMessage

@Serializable
data class GenericMessage(
    val message: Message
) : ClientMessage()

@Serializable
enum class Message {
    INIT,
    JOIN
}

@Serializable
data class ShotMessage(
    val gameId: String,
    val coordinates: Coordinates,
) : ClientMessage()

@Serializable
data class JoinMessage(
    val gameId: String
) : ClientMessage()

@Serializable
data class PlaceShipMessage(
    val gameId: String,
    val shipHeadCoordinates: Coordinates,
    val ship: Ship
) : ClientMessage()